home *** CD-ROM | disk | FTP | other *** search
- Path: gsfc.nasa.gov!ejh
- From: ejh@larry.gsfc.nasa.gov (Edward Hartnett)
- Newsgroups: comp.lang.c++,comp.lang.c,comp.object,comp.software-eng
- Subject: Re: Portability of code & skills (Beware of "C" Hackers etc)
- Date: 19 Mar 1996 21:37:45 GMT
- Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA
- Message-ID: <EJH.96Mar19163745@larry.gsfc.nasa.gov>
- References: <4ikb6kINN1is@mayne.ugrad.cs.ubc.ca> <DoI5Ao.AyJ@assip.csasyd.oz>
- NNTP-Posting-Host: larry.gsfc.nasa.gov
- In-reply-to: donh@syd.csa.com.au's message of Tue, 19 Mar 1996 06:42:23 GMT
-
- >>>>> "D" == Don Harrison <donh@syd.csa.com.au> writes:
-
- D> Kazimir Kylheku writes:
- >> In article <DoG3HE.48E@assip.csasyd.oz>,
- >> Don Harrison <donh@syd.csa.com.au> wrote:
- >> >Graham Perkins writes:
-
- D> [...]
-
- >> >... So if you want your new language to be a success,
- >> >:then give it away for ten years, preferably with a free O.S. and all source
- >> >:code as well. It's difficult to see many other reasons for widespread
- >> >:adoption of C and Unix.
-
- >> >Aside from the historical argument, could another reason be that people
- >> >love power and permissive languages such as C give such power? The trouble
-
-
- No I think it really was mostly because of unix.
-
- Languages hold on a long time based on such a thing.
-
- As for C's supposed permissivness, I never yet saw a computer language
- that you couldn't write bad code in.
-
- >> >is, of course, that most people don't handle power responsibly because we
- >> >are selfish by nature. Our short-sighted selfishness is manifested in
- >> >programming as hacking.
- >>
- >> What does selfishness have to do with anything? It's just a matter of using
- >> undefined and implementation defined behavior. The problem is laziness to learn
- >> the language properly.
-
- D> I'm thinking of those who hack because they expect they won't be around to
- D> maintain their handiwork. It is selfishness because they don't care about the
- D> person maintaining it. Call it laziness, if you prefer.
-
- D> Those who hack knowing they are the maintainer are just fools.
-
- No I think that's simplistic. I know of very few programmers who want
- to hack. But when one is starting out in a new language, etc., one can
- write some bad code. For example I look at my first attempts at OO
- programming and it looks like a bit of a hack to me now.
-
- Not to mention that at the beginning of one's career hacking may work
- just fine. It takes a while for something to break usually. By the
- time the programmer has learned her or his lesson there are several
- applications that they hacked that are running in their department or
- whatever.
-
- That's how hacked programming can happen in the absense of a true
- hacker.
-
- Of course I have know true hackers. People who's code management is so
- poor, and style so cryptic, that it's impossible to work with their
- code. Most people are very responsive to criticism about their
- code. (I know I am). Some are not.
-
- I think C definately has a culture that attracts these hackers. But
- they are really very rare.
-
- >> The C language is not as permissive as you may think: it just leaves it up to
- >> the implementations to give meaning to many operations, while it perfectly
- >> defines others.
- >>
-
- Hmmm. Most of what I would call hacked code is not code that violates
- the standard by depending on undefined behaviour, but rather code that
- does weird (but usually standard conforming) things with memory or
- pointers.
-
- >> Another thing is that C compilers don't provide enough run-time checking,
- >> because the standard doesn't require them to, but that's another issue
- >> altogether from permissiveness inherent to the language.
-
- Huh? gcc with the -Wall option gives me plenty of good warnings!
-
-
-
-
-
- --
- Edward Hartnett ejh@larry.gsfc.nasa.gov
- * I don't speak for NASA or ARC, I just work for them! *
- Goddard Distributed Active Archive Center (DAAC)
- Check out cool Earth Science data at: http://daac.gsfc.nasa.gov/
-
-